#include "IAInterface.h"
#include "IAInterfaceDX9.h"
#include "IAInterfaceDX10.h"

CIAInterfaceBase::CIAInterfaceBase( )
{
}

CIAInterfaceBase::~CIAInterfaceBase( )
{
}

CIAInterfaceBase *CIAInterfaceBase::CreateIAI( )
{
    switch (g_ApiVersion)
    {
    case V_D3D9:
    	return new CIAInterfaceDX9;
    case V_D3D10:
        return new CIAInterfaceDX10;
    }

    return NULL;
}

CIAInterface::CIAInterface( )
{
    m_pIAI               = CIAInterfaceBase::CreateIAI( );
    m_pVertexDeclaration = CVertexDeclaration::CreateVertexDeclaration( );
}

CIAInterface::~CIAInterface( )
{
    delete m_pIAI;
    delete m_pVertexDeclaration;
}

